import request from '@/utils/request'

// 查询收入单信息列表
export function listCw(query) {
  return request({
    url: '/mes/cw/cw/list',
    method: 'get',
    params: query
  })
}

// 查询收入单信息详细
export function getCw(incomeId) {
  return request({
    url: '/mes/cw/cw/' + incomeId,
    method: 'get'
  })
}

// 新增收入单信息
export function addCw(data) {
  return request({
    url: '/mes/cw/cw',
    method: 'post',
    data: data
  })
}

// 修改收入单信息
export function updateCw(data) {
  return request({
    url: '/mes/cw/cw',
    method: 'put',
    data: data
  })
}

// 删除收入单信息
export function delCw(incomeId) {
  return request({
    url: '/mes/cw/cw/' + incomeId,
    method: 'delete'
  })
}
